<!DOCTYPE html>
<html lang="en">
<head>
   		<meta charset="UTF-8">
    	<title>Touch.JS</title>
</head>
<body>
	<img id="target" draggable="false" src="images/1.jpg" class="show" 		style="transform: rotate(-9762deg);">

	<script src="js/bdtouch.js"></script>
	<script type="text/javascript">
		//rotation
    	var angle = 0; // 当前的角度
    	touch.on('#target', 'touchstart', function(ev){
    		console.log(ev) // 事件
    		ev.startRotate();
    		ev.preventDefault();
		});

    	touch.on('#target', 'rotate', function(ev){
    		console.log(ev.rotation)
    		var totalAngle = angle + ev.rotation;
    			if(ev.fingerStatus === 'end'){
        				angle = angle + ev.rotation;
   		 	}
    		this.style.webkitTransform = 'rotate(' + totalAngle + 'deg)';
		});
    	
	</script>
</body>
</html>
